package com.itheima.mall.service.sms;

import com.itheima.mall.api.sms.SmsFlashPromotionServiceApi;
import com.itheima.mall.pojo.sms.SmsFlashPromotion;
import com.itheima.mall.vo.PageResult;
import com.itheima.mall.vo.R;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SmsFlashPromotionService {
    @DubboReference
    SmsFlashPromotionServiceApi smsFlashPromotionServiceApi;
    public PageResult<SmsFlashPromotion> getList(String keyword, int pageNum, int pageSize) {
       PageResult<SmsFlashPromotion> list = smsFlashPromotionServiceApi.getList(keyword, pageNum, pageSize);
        return list;
    }

    public void updateStatus(int id,int status) {
        smsFlashPromotionServiceApi.updateStatus(id,status);
    }
    //编辑活动
    public void editActivity(SmsFlashPromotion smsFlashPromotion, Long id) {
        smsFlashPromotionServiceApi.editActivity(smsFlashPromotion,id);
    }
    //添加活动
    public void addActivity(SmsFlashPromotion smsFlashPromotion) {
        smsFlashPromotionServiceApi.addActivity(smsFlashPromotion);
    }
    //删除活动
    public void deleteActivity(Integer id) {
        smsFlashPromotionServiceApi.deleteActivity(id);
    }
}
